﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microhard.Permission_MembershipImpl
{
    public class PermissionComparer : IEqualityComparer<MicroHard_Permission>
    {


        #region IEqualityComparer<MicroHard_Permission> Members

        public bool Equals(MicroHard_Permission x, MicroHard_Permission y)
        {
            if (x == null)
                return false;
            if (y == null)
                return false;
            if (x.ResID == y.ResID)
            {
                return true;
            }
            return false;
        }

        public int GetHashCode(MicroHard_Permission obj)
        {
            return obj.ResID.GetHashCode();
        }

        #endregion
    }
}
